package _6_Struct._6_3_composite.transparency;

import java.util.Enumeration;
import java.util.Vector;

public class Composite implements Component {
    Vector<Component> vector = new Vector<>();

    @Override
    public Composite getComposite() {
        return this;
    }

    @Override
    public void bussinessOpt1() {
    }

    @Override
    public void add(Component component) {
        vector.add(component);
    }

    @Override
    public void remove(Component component) {
        vector.remove(component);
    }

    @Override
    public Enumeration<Component> components() {
        return vector.elements();
    }
}
